﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScreenMonitor.Common;

namespace ScreenMonitor.Wpf.Common.Object
{
    public class ClientObject:MemoryStreamSendableObjectBase<ClientObject>
    {
        private string RemotePointV;
        /// <summary>
        /// 客户端关联的远程终结点（唯一标识）
        /// </summary>
        public string RemotePoint
        {
            get { return RemotePointV; }
        }

        private string NameV;
        /// <summary>
        /// 客户端名称
        /// </summary>
        public string Name
        {
            get 
            { return NameV; 
            }
            set 
            {
                NameV = value; 
            }
        }
        

        public override void ToStream(System.IO.BinaryWriter sw)
        {
            sw.Write(RemotePointV);
            sw.Write(NameV);
        }

        public override void FromStream(System.IO.BinaryReader sr)
        {
            RemotePointV = sr.ReadString();
            NameV = sr.ReadString();
        }

    }
}
